package com.bvgol.examples.springbootLogback.common;/**
 * @Classname R
 * @Description TODO
 * @Date 2021/3/16 10:16
 * @Created by GUOCHEN
 */

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @program: my-spring-completely
 * @description:
 * @author: GUOCHEN
 * @create: 2021/03/16 10:16
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class R<T> {
    private int code;
    private T data;
    private boolean success;
    private String msg;

    public static R success(String s) {
        return R.builder().code(200).success(true).msg(s).build();
    }
}
